package day16;
/*本类用于复习多线程编程方式一*/
public class TestExtendsThread {
    public static void main(String[] args) {
        //4.创建线程对象并进行测试
        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();
        MyThread t3 = new MyThread();

        t1.start();
        t2.start();
        t3.start();
    }
}
//1.自定义一个多线程类
class MyThread extends Thread{
    //2.实现业务,必须放在重写的run()里
    @Override
    public void run() {
        //3.表示调用父类的业务,不需要,注释掉
        //super.run();
        for (int i = 1; i < 11; i++){
            System.out.println(i+"="+getName());
        }
    }
}